package com.endpoint.member.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Project: endpoint
 * @Name: OAuth2Config
 * @Author: Jack_Li
 * @Date: 2024/7/6 13:30
 */
@Data
@Component
public class OAuth2Config {

    // GitHub 登录
    // https://api.github.com/user?access_token=4dc43c2f43b773c327f97acf5dd66b147db9259c
    // https://github.com/login/oauth/access_token?client_id=${clientID}&client_secret=${clientSecret}&code=${requestToken}
    private String githubHost = "https://github.com";
    private String githubPath = "/login/oauth/access_token?client_id=clientId&client_secret=clientSecret&code=authorize_code";
    @Value("${spring.security.oauth2.client.registration.github.client-id}")
    private String githubClientId;
    @Value("${spring.security.oauth2.client.registration.github.client-secret}")

    private String githubClientSecret;
    private String githubGetUserInfoHost = "https://api.github.com";
    private String githubGetUserInfoPath = "/user";

}
